<?php

	class Event
	{
		const TYPE_COMMAND = "command";
		const TYPE_REDIRECT = "redirect";
		const TYPE_DATA = "data";
	
		var $type;
		var $data;
		
		function __construct($type,$data = null)
		{
			$this->type = $type;
			$this->data = $data;
		}
		
		function dispatch()
		{
			return EbController::dispatchEvent($this);
		}
	}
	
	class EventData extends Event
	{
		
		
		function __construct($data)
		{
			parent::__construct(Event::TYPE_DATA);
		

		}
	
		function getData()
		{
			
		}
	}
	
	class EventRedirect extends EventData
	{
		function __construct($data)
		{
			parent::__construct($data);
		
			$this->data = Event::TYPE_REDIRECT;
		}
	
		function getUrl()
		{
			return $this->data;
		}
	}
	
	class EventResponse extends Event
	{
	
	}
	
?>